import request from "@/util/request";

export function getUserInfo(token){
    return request({
        url: '/wechat/login?token=' + token,
        method: 'post'
    })
}

export function wechatLogin(unionId){
    return request({
        url: '/wechat/login?union_id=' + unionId,
        method: 'post'
    })
}

export function add(wechat){
    return request({
        url: '/wechat/add',
        method: 'post',
        data: wechat
    })
}

export function deleteWechat(id){
    return request({
        url: '/wechat/delete/' + id,
        method: 'delete'
    })
}

export function wechatList(){
    return request({
        url: '/wechat/list',
        method: 'get'
    })
}